package com.marsrover.state;

import com.marsrover.Rover;
import com.marsrover.RoverManager;

public class CommandsReady extends RoverManagerState {
	@Override
	public Rover buildRover(RoverManager roverManager, String initLocationInfo) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void sendCommands(RoverManager roverManager, String commands) {
		createExecutor(roverManager).sendCommands(commands);
	}

	@Override
	public void launchRover(RoverManager roverManager) {
		roverManager.setState(ROVER_RUNNING);
		createExecutor(roverManager).launchRover();
		roverManager.setState(READY_TO_BUILDER_ROVER);
	}
}
